package Kernel;

/**
 *
 * @author Robin Lilja
 * @version 2009-09-22 1100h
 *
 */
public abstract class Behavior {

	/**
	 * Interface of the HAL.
	 */
	private IHardwareAbstractionLayer hal;

	/**
	 * Name of the behavior.
	 */
	private String name;

	/**
	 * Tells if behavior is ready to take control. This should only occur if the
	 * behavior's control conditions are all fulfilled.
	 *
	 * @return True if ready
	 */
	public abstract boolean isReady();

	/**
	 * Runs the behavior. Makes the behavior in control of the robot.
	 */
	public abstract void run();

	/**
	 * Stops the behavior. Releases the behavior's control of the robot.
	 */
	public abstract void stop();

	/**
	 * Behavior representation as string.
	 *
	 * @return Behavior name as string.
	 */
	public String toString() {

		return name;
	}
}
